package cn.iocoder.yudao.module.trade.dal.mysql.ordersafetycheckitemrelation;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.trade.dal.dataobject.ordersafetycheckitemrelation.OrderSafetyCheckItemRelationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.trade.controller.admin.ordersafetycheckitemrelation.vo.*;

/**
 * 安检单与安检明细关联 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface OrderSafetyCheckItemRelationMapper extends BaseMapperX<OrderSafetyCheckItemRelationDO> {

    default PageResult<OrderSafetyCheckItemRelationDO> selectPage(OrderSafetyCheckItemRelationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderSafetyCheckItemRelationDO>()
                .eqIfPresent(OrderSafetyCheckItemRelationDO::getCheckId, reqVO.getCheckId())
                .eqIfPresent(OrderSafetyCheckItemRelationDO::getCheckItemId, reqVO.getCheckItemId())
                .betweenIfPresent(OrderSafetyCheckItemRelationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderSafetyCheckItemRelationDO::getId));
    }

}